<!--
  Copyright 2012-2019 the original author or authors.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<div ng-include src="'template/gt-loading-overlay.html'"></div>
<div ng-include src="'template/gt-http-error-overlay.html'"></div>
<div ng-if="agentNotConnected" class="alert alert-danger" role="alert">
  This feature is only available when the agent is running and connected
</div>
<!-- ng-show needed here instead of ng-if because thread-dump.js binds directly to #threadDump -->
<div ng-show="loaded && !agentNotConnected">
  <div class="d-flex justify-content-between align-items-start pb-4">
    <div gt-button
         gt-label="Refresh"
         gt-click="refresh(deferred)">
    </div>
    <button class="btn btn-secondary"
            ng-click="exportAsText()">
      Export as text
    </button>
  </div>
  <div class="gt-thread-dump-flat-pre"
       id="threadDump">
  </div>
</div>
<!-- escape key doesn't close modal in some situations without tabindex="-1"
     in particular, open trace modal, expand trace entries, then expand a concatenated span (one with ...)
     then hit escape key and modal doesn't close (at least not in chrome) -->
<div class="modal gt-full-width-modal gt-full-height-modal"
     role="dialog"
     tabindex="-1"
     id="traceModal">
  <div class="modal-dialog modal-dialog-centered"
       role="document">
    <div class="modal-content">
      <div class="gt-close-sticky">
        <!-- enclosing div is needed so that button clickable space doesn't consume entire page width -->
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body"></div>
    </div>
  </div>
</div>
